home *** CD-ROM | disk | FTP | other *** search
/ The Very Best of Atari Inside / The Very Best of Atari Inside 1.iso / mint / mgr / lib / restart.h < prev    next >
C/C++ Source or Header  |  1989-01-24  |  1KB  |  45 lines

  1. /*                        Copyright (c) 1987 Bellcore
  2.  *                            All Rights Reserved
  3.  *       Permission is granted to copy or use this program, EXCEPT that it
  4.  *       may not be sold for profit, the copyright notice must be reproduced
  5.  *       on copies, and credit should be given to Bellcore where it is due.
  6.  *       BELLCORE MAKES NO WARRANTY AND ACCEPTS NO LIABILITY FOR THIS PROGRAM.
  7.  */
  8. /*    $Header: restart.h,v 4.1 88/06/21 13:40:38 bianchi Exp $
  9.     $Source: /tmp/mgrsrc/lib/RCS/restart.h,v $
  10. */
  11. static char    h_restart_[] = "$Source: /tmp/mgrsrc/lib/RCS/restart.h,v $$Revision: 4.1 $";
  12.  
  13. /* stuff for restarting upon reshape/ redraw */
  14.  
  15. #ifndef ECHO
  16. #include <sgtty.h>
  17. #endif
  18.  
  19. #include <setjmp.h>
  20.  
  21. #ifndef SIGQUIT
  22. #include <signal.h>
  23. #endif
  24.  
  25. extern int _Catch(), _Clean();
  26. extern jmp_buf _env;
  27.  
  28. #ifdef QUIT_CHAR
  29. static char *_quit = QUIT_CHAR;
  30. #else
  31. static char *_quit = "\034";
  32. #endif
  33.  
  34. #define Ignore()    signal(SIGQUIT,SIG_IGN)
  35.  
  36. #define Restart()    signal(SIGINT,_Clean), \
  37.              signal(SIGTERM,_Clean), \
  38.              signal(SIGQUIT,_Catch), \
  39.              m_saveenvcount = m_envcount, \
  40.              m_pushsave(P_EVENT), \
  41.              m_setevent(RESHAPE,_quit), \
  42.              m_setevent(REDRAW,_quit), \
  43.              m_setevent(UNCOVERED,_quit), \
  44.              setjmp(_env)
  45.